Skip to main content link. Accesskey S
  • Help
  • HCL Logo
  • HCL Notes and Domino Application Development wiki
  • THIS WIKI IS READ-ONLY. Individual names altered for privacy purposes.
  • HCL Forums and Blogs
  • Home
  • Product Documentation
  • Community Articles
  • Learning Center
  • API Documentation
Search
Community Articles > Programming > PickListStrings - Something Unexpected
  • Share Show Menu▼
  • Subscribe Show Menu▼

Recent articles by this author

When 38.3 - 38 equals 0.299999999999997... and what to do about it

Obviously I forgot about the "fraction()" function, so I removedchanged parts of this article (thanks @Mario for the hint) :)   If you need the digits behind the decimal seperator of a number, you might subtract the integer of the number from the number itself: 1.3 int(1.3) e.g. would result ...

When rounding 0.5 equals 0... and what to do about it

Do you know the difference between rounding a number commercially and rounding it mathematically? Notes does... This is, why in Formula @Round(0.5; 1) equals 1, but the equivalent in LotusScript round(0.5, 0) equals 0... Wonder if round(1.5, 0) equals 1? No, the result is...: 2 The reason is, that ...

The third SaveOptions value, or How to suppress the "Do you want to save this document?" message box in Notes

Yes, SaveOptions understands more than just "0" or "1": Did you ever face the problem, that Lotus Notes keeps asking if you want to save the current document, even though you just did? Picture the following scenario: A user creates a document with a certain form that contains a "Change Field ...

Pitfall on NotesUiDocument vs. NotesDocument field changes - unexpected "Reload"

When performing mixed changes on fields, i.e. changing fields in a NotesUiDocument and others in the corresponding backend NotesDocument, it is very important to make sure that they do not have any sideeffects on each other. Could be ugly...   To see what I mean, try this one:   Build a simple ...

Forgotten Notes Features: $PaperColor

Anyone remember, and actually uses (besides in his memos, maybe not knowing) the field "PaperColor" in Lotus Notes documents? Using this field, you can set a dynamic background color in your documents. The field needs to be numeric and contain a number from 1 to 238; usually this field will be ...
Community articlePickListStrings - Something Unexpected
Added by ~Frank Quetlupulikle | Edited by ~Frank Quetlupulikle on March 3, 2010 | Version 2
  • Actions Show Menu▼
expanded Abstract
collapsed Abstract
No abstract provided.
Tags: LotusScript PickListStrings

If you look for the cause of an error, it's not always the obvious - like in this case:

The following LotusScript function retrieves a Notes database filepath, a view name and title and prompt to show a picklist to the user, and display the user selection in a messagebox.

 

Function handlePicklistResult(dbFilepath As String, viewName As String, dlgTitle As String, dlgPrompt As String) As Variant

 
 On Error Goto errorhandler
 
 Dim res As Variant
 
 Dim ws As New NotesUIWorkspace 
 res = ws.PickListStrings( _
 PICKLIST_CUSTOM, _
 False, _
 "", _
 dbFilepath, _
 viewName, _
 dlgTitle, _
 dlgPrompt, _
 1 )
 
 If Not Isempty(res) Then
  Msgbox Join(res, "")
 End If
 
e:
 Exit Function
errorhandler:
 Msgbox "Error " & Error & " in line " & Erl
 Resume e
End Function

 

Now, the code results in the following error:

 

Error Notes Error - Incorrect argument: non-null string expected in line 16

 

Can you guess why (it's in the parameters...)?

 

It could be, that dbFilepath is not set, but it is...
It could be, that the viewName is not set, but it is...

 

So what is it?

 

It's the title and the prompt! PickListStrings does not allow an empty title or an empty prompt. If you do not want to show a title or a prompt, you have to use at least a space character...

 
About the Author
Marcus Foerster works as Systems Architect for Pentos AG in Munich, Germany. His focus lies on the application side, creating collaboration systems for users, groups and enterprises to get their daily work done. This approach includes integrating complex workflows with intuitive user interfaces, using Lotus Notes/Domino with Adobe Flex and other Web technologies.
Read more in Marcus' blog: http://marcus.foerster.com/blogexternal link 


  • Actions Show Menu▼


expanded Attachments (0)
collapsed Attachments (0)
Edit the article to add or modify attachments.
expanded Versions (2)
collapsed Versions (2)
Version Comparison     
VersionDateChanged by              Summary of changes
This version (2)Mar 3, 2010, 9:09:20 AM~Frank Quetlupulikle  
1Mar 3, 2010, 9:08:41 AM~Hank Nonhipilygon  
expanded Comments (0)
collapsed Comments (0)
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedAbout
  • HCL Software
  • HCL Digital Solutions community
  • HCL Software support
  • BlogsDigital Solutions blog
  • Community LinkHCL Software forums and blogs
  • About HCL
  • Privacy
  • Accessibility